<template>
  
  <div class="play">
     <van-swipe style="height: 100vh;"
      vertical 
      @change="onChange"
      :show-indicators='false'>
    <van-swipe-item 
      v-for="item in songlist||playlist" 
      :id='item.id'
   >
  <player></player>
  </van-swipe-item>
</van-swipe>
 </div>
</template>

<script>
import player from '@/components/Small/Player.vue'

import {mapState,mapGetters} from 'vuex'

export default {
   components:{
      player
       
   }
   ,
  computed:{
    ...mapState(['curtime','paused','duration','songid','playlist','songlist']),
    ...mapGetters(['randomlist'])

  },
  methods:{
        onChange(index){
         //   console.log('onchange',index);
           this.$store.commit('changesongid',this.playlist[index].id);
         //   console.log(this.playlist[index]);
        }
  },
  mounted(){
     console.log(this.playlist);
  }
}
</script>

<style>
.play{
  height:100vh;
}

</style>